package com.newly.common.base.entity.sys.tenant.bo;

import com.newly.common.base.entity.auth.ICurrentTenant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * paas_user
 *
 * @author
 */
@ApiModel(value = "用户bo")
@Data
public class TenantBo implements Serializable {
    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    private Long id;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
    private String userName;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码")
    private String password;

    /**
     * 昵称
     */
    @ApiModelProperty(value = "昵称")
    private String nickName;

    /**
     * 微信号
     */
    @ApiModelProperty(value = "微信号")
    private String wechatAccount;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    private String phone;

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
    private String email;

    /**
     * 身份证
     */
    @ApiModelProperty(value = "身份证")
    private String idCard;

    /**
     * 照片uri
     */
    @ApiModelProperty(value = "照片uri")
    private String pictureUri;

    /**
     * 头像uri
     */
    @ApiModelProperty(value = "头像uri")
    private String headImgUri;

    /**
     * 用户类型，-1超级管理员，0管理员，1普通用户
     */
    @ApiModelProperty(value = "用户类型，-1超级管理员，0管理员，1普通用户")
    private Integer type;

    /**
     * 客户端类型，例如：移动端或pc端等
     */
    @ApiModelProperty("客户端类型")
    private Integer clientCode;

    /**
     * 用户等级
     */
    @ApiModelProperty(value = "用户等级")
    private Integer level;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 逻辑删除标志位
     */
    @ApiModelProperty(value = "逻辑删除标志位")
    private Integer enable;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public TenantBo(ICurrentTenant currentTenant) {
        this.id = currentTenant.getUserId();
        this.userName = currentTenant.getUsername();
        this.nickName = currentTenant.getNickname();
        this.type = currentTenant.getType();
    }

    public TenantBo() {
    }
}